from marshmallow import Schema, fields, validate

class UserSchema(Schema):
    username = fields.Str(required=True, validate=validate.Length(min=3, max=64))
    email = fields.Email(required=True)
    password = fields.Str(required=True, validate=validate.Length(min=6))

class LoginSchema(Schema):
    username = fields.Str(required=True)
    password = fields.Str(required=True)

class NoteSchema(Schema):
    content = fields.Str(required=True, validate=validate.Length(min=1))
    ai_response = fields.Str(required=False)
    ai_style = fields.Str(required=False, validate=validate.Length(max=20))

class ResetPasswordSchema(Schema):
    username = fields.Str(required=True)
    email = fields.Email(required=True)
    new_password = fields.Str(required=True, validate=validate.Length(min=6))

class AIStyleSchema(Schema):
    name = fields.Str(required=True, validate=validate.Length(max=11))
    prompt = fields.Str(required=True)
    description = fields.Str(required=False)
